XN.namespace("ui");
(function(){
XN.ui.element={frame:null,iAmUIelement:true};
XN.array.each(["addClass","delClass","show","hide","remove"],function(i,v){
XN.ui.element[v]=function(){
XN.element[v].apply(null,[this.frame].concat(XN.array.build(arguments)));
};
});
XN.ui.container={container:null};
XN.array.each(["addChild","delChild","setContent"],function(i,v){
XN.ui.container[v]=function(){
XN.element[v].apply(null,[this.container].concat(XN.array.build(arguments)));
};
});
$extend(XN.ui.container,XN.ui.element);
})();
XN.UI=XN.Ui=XN.ui;
XN.ui.Element=XN.ui.element;
XN.ui.Content=XN.ui.container;
(function(ns){
var UI=XN.ui;
var _7=XN.event.addEvent;
var _8=true;
function log(s){
if(_8){
XN.log(isString(s)?"xn.ui.button:"+s:s);
}
}
ns.button=function(_a){
$extend(this,_a);
this.init();
};
ns.button.prototype=$extend({},UI.Element);
ns.button.prototype.text=null;
ns.button.prototype.className="";
ns.button.prototype.disableClassName="gray";
ns.button.prototype.init=function(){
var _b=this;
var el;
if(this.getConfig("el")){
el=$(this.getConfig("el"));
}else{
el=$element("input");
}
this.frame=el;
el.type="button";
this.addClass("input-submit");
this.addClass(this.getConfig("className"));
this.setText(this.getConfig("text"));
_7(el,"click",function(){
if(_b.onclick){
_b.onclick();
}
},false);
};
ns.button.prototype.getConfig=function(_d){
if(_d=="el"){
return this.id;
}
return this[_d];
};
ns.button.prototype.getEl=function(){
return this.frame;
};
ns.button.prototype.setText=function(_e){
this.text=_e;
this.getEl().value=_e;
};
ns.button.prototype.disable=function(){
var el=this.getEl();
el.blur();
el.disabled=true;
el.addClass(this.getConfig("disableClassName"));
};
ns.button.prototype.enable=function(){
var el=this.getEl();
el.disabled=false;
el.delClass(this.getConfig("disableClassName"));
};
ns.button.prototype.focus=function(){
this.getEl().focus();
};
ns.button.prototype.blur=function(){
this.getEl().blur();
};
})(XN.ui);
(function(){
var rl="realLeft",rt="realTop",ow="offsetWidth",oh="offsetHeight";
XN.ui.fixPositionMethods={"1-1":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+"px";
f.style.top=y+el[rt]()-p[rt]()+"px";
},"1-2":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+"px";
},"1-3":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()-f[oh]+"px";
},"1-4":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+"px";
f.style.top=y+el[rt]()-p[rt]()-f[oh]+"px";
},"2-1":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+"px";
},"2-2":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]();
},"2-3":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()-f[oh]+"px";
},"2-4":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()-f[oh]+"px";
},"3-1":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]+"px";
},"3-2":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]-f[ow]+"px";
f.style.top=y+el[rt]()+el[oh]+"px";
},"3-3":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]-f[oh]+"px";
},"3-4":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]-f[oh]+"px";
},"4-1":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]+"px";
},"4-2":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]+"px";
},"4-3":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]-f[oh]+"px";
},"4-4":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]-f[oh]+"px";
}};
})();
XN.ui.fixPositionElement=function(_65){
var _66=this;
this.config={tagName:"div",useIframeInIE6:true};
$extend(this.config,_65);
var f,x,y;
if(this.getConfig("id")){
this.frame=f=$(this.getConfig("id"));
x=f.realLeft();
y=f.realTop();
}else{
if(this.getConfig("tagName")){
this.frame=this.container=f=$element(this.getConfig("tagName"));
}else{
return;
}
}
this.container=$element("div");
this.frame.appendChild(this.container);
XN.array.each(["alignWith","alignType","offsetX","offsetY","alignParent"],function(i,v){
_66[v]=_66.getConfig(v)||_66[v];
});
XN.element.setStyle(f,"position:absolute;z-index:10001;left:-9999px;top:-9999px");
if(!$(this.alignParent)){
this.alignParent=$(document.body);
}
$(this.alignParent).appendChild(this.frame);
if((XN.browser.IE6&&this.getConfig("useIframeInIE6"))||this.getConfig("addIframe")){
var _6c;
this._iframe=_6c=$element("iframe");
_6c.frameBorder=0;
_6c.setStyle("position:absolute;border:0px;left:0px;top:0px;z-index:-1;");
if(XN.browser.Gecko){
_6c.setAttribute("style","position:absolute;border:0px;left:0px;top:0px;z-index:-1;");
}
if(XN.browser.IE){
_6c.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
}
this.frame.appendChild(_6c);
}
if(XN.element.visible(f)){
this.show();
}
f.style.display="block";
};
XN.ui.fixPositionElement.prototype=$extend({},XN.ui.container);
$extend(XN.ui.fixPositionElement.prototype,{alignWith:null,alignType:"4-1",offsetX:0,offsetY:0,alignParent:"dropmenuHolder",left:null,top:null,_isShow:false,getConfig:function(key){
return this.config[key];
},setOffsetX:function(x){
this.offsetX=x;
this.refresh();
return this;
},setOffsetY:function(y){
this.offsetY=y;
this.refresh();
return this;
},setAlignType:function(t){
this.alignType=t;
this.refresh();
return this;
},setAlignParent:function(p){
this.alignParent=p;
$(this.alignParent).appendChild(this.frame);
this.refresh();
return this;
},refresh:function(){
if(this.visible()){
this.show();
}else{
this.hide();
}
return this;
},visible:function(){
return this._isShow;
},show:function(){
this._isShow=true;
this.frame.show();
if(this.alignWith){
this._moveToElement(this.alignWith);
}else{
var x=this.left===null?parseInt((($(this.alignParent).offsetWidth-this.frame.offsetWidth)/2),10):this.left;
var y=this.top===null?XN.event.scrollTop()+200:this.top;
this._moveToPosition(x,y);
}
if(this._iframe){
try{
this._iframe.style.height=this.frame.offsetHeight-2+"px";
this._iframe.style.width=this.frame.offsetWidth+"px";
}
catch(e){
}
}
return this;
},hide:function(){
this._isShow=false;
var f=this.frame;
f.style.left="-9999px";
f.style.top="-9999px";
return this;
},moveTo:function(x,y){
if(!x&&!y){
return;
}
if(isNumber(x)){
this.left=x;
this.alignWith=null;
}else{
if(isString(x)||isElement(x)){
this.alignWith=$(x);
}
}
if(isNumber(y)){
this.top=y;
this.alignWith=null;
}
this.refresh();
return this;
},setX:function(x){
this.moveTo(x);
return this;
},setY:function(y){
this.moveTo(null,y);
return this;
},setIndex:function(i){
this.frame.style.zIndex=i;
return this;
},_moveToElement:function(el){
XN.ui.fixPositionMethods[this.alignType](this.frame,$(el),this.offsetX,this.offsetY,$(this.alignParent));
},_moveToPosition:function(x,y){
if(x){
this.frame.style.left=x+"px";
}
if(y){
this.frame.style.top=y+"px";
}
}});
(function(){
var _7d=XN.ui.fixPositionElement.prototype;
var _7e=XN.event;
XN.ui.dialog=function(_7f){
var _80=this;
XN.ui.fixPositionElement.call(this,_7f);
this.container=$element("div");
this.frame.appendChild(this.container);
if(this.getConfig("HTML")){
this.setContent(this.getConfig("HTML"));
}else{
this.setContent(this.buildHTML());
}
this.header=$("ui_dialog_header");
this.body=$("ui_dialog_body");
this.footer=$("ui_dialog_footer");
this.header.addChild=this.body.addChild=this.footer.addChild=function(s){
XN.element.addChild(this,s);
setTimeout(function(){
_80.refresh();
},0);
};
this.header.removeAttribute("id");
this.body.removeAttribute("id");
this.footer.removeAttribute("id");
this.frame.style.zIndex=10000;
this.setWidth(this.getConfig("width")||400);
if(this.getConfig("height")){
this.setHeight(this.getConfig("height"));
}
XN.array.each(["header","body","footer"],function(i,v){
if(_80.getConfig(v)){
_80[v].setContent(_80.getConfig(v));
}
});
if(this.getConfig("type")){
this.setType(this.getConfig("type"));
}
this._buttons=[];
XN.event.addEvent(this.footer,"click",function(e){
e=e||window.event;
_80._parseButtonEvent(e);
});
XN.util.hotKey.add("27",this._hotKeyEvent,this);
if(this.getConfig("modal")){
XN.dom.disable();
}
};
XN.ui.dialog.prototype=$extend({},_7d);
$extend(XN.ui.dialog.prototype,{header:null,body:null,footer:null,_iframe:null,_buttons:null,buildHTML:function(){
return ["<table style=\"width: 100%; height: 100%;\" class=\"pop_dialog_table\">","<tbody>","<tr>","<td class=\"pop_topleft\"></td>","<td class=\"pop_border\"></td>","<td class=\"pop_topright\"></td>","</tr>","<tr>","<td class=\"pop_border\"></td>","<td class=\"pop_content\">","<h2><span id=\"ui_dialog_header\"></span></h2>","<div class=\"dialog_content\">","<div id=\"ui_dialog_body\" class=\"dialog_body\"></div>","<div id=\"ui_dialog_footer\" class=\"dialog_buttons\"></div>","</div>","</td>","<td class=\"pop_border\"></td>","</tr>","<tr>","<td class=\"pop_bottomleft\"></td>","<td class=\"pop_border\"></td>","<td class=\"pop_bottomright\"></td>","</tr>","</tbody>","</table>"].join("");
},getButton:function(_85){
var _86=this._buttons;
for(var i=_86.length-1;i>=0;i--){
if(_86[i].text==_85){
return _86[i];
}
}
return null;
},addButton:function(b){
var o={text:b.text,_onclickForDialog:b.onclick};
if(b.className){
o.className=b.className;
}
var _8a=new XN.ui.button(o);
_8a.frame.setAttribute("dialog","1");
this._buttons.push(_8a);
this.footer.addChild(_8a);
return this;
},delButton:function(b){
if(isString(b)){
b=this.getButton(b);
}
this.footer.delChild(b);
return this;
},_preventHide:false,preventHide:function(){
this._preventHide=true;
return this;
},_parseButtonEvent:function(e){
var el=_7e.element(e);
if(el.tagName.toLowerCase()!=="input"||el.type!=="button"){
return;
}
if(!el.getAttribute("dialog")){
return;
}
var _8e=this.getButton(el.value);
if(_8e&&_8e._onclickForDialog){
_8e._onclickForDialog.call(this);
}
if(this._preventHide){
this._preventHide=true;
}else{
this.hide();
}
},_hotKeyEvent:function(){
this.hide();
},setType:function(t){
if(t=="normal"){
this.frame.delClass("errorDialog");
}else{
if(t=="error"){
this.frame.addClass("errorDialog");
}
}
return this;
},setWidth:function(w){
if(!w){
return this;
}
this.width=w;
this.frame.style.width=w+"px";
this.refresh();
return this;
},setHeight:function(h){
if(!h){
return this;
}
this.hegith=h;
this.frame.style.height=h+"px";
this.refresh();
return this;
},resizeTo:function(w,h){
this.setWidth(w);
this.setHeight(h);
return this;
},clear:function(){
this.header.setContent("");
this.body.setContent("");
this.footer.setContent("");
this._buttons=[];
return this;
},setTitle:function(s){
this.header.setContent(s);
return this;
},setBody:function(s){
this.body.setContent(s);
return this;
},remove:function(){
XN.util.hotKey.del("27",this._hotKeyEvent);
XN.ui.element.remove.call(this);
return this;
},refresh:function(){
if(this.visible()){
_7d.show.apply(this,arguments);
}else{
this.hide();
}
return this;
},show:function(){
this._clearHideTimer();
_7d.show.apply(this,arguments);
return this;
},hide:function(){
this._clearHideTimer();
_7d.hide.apply(this,arguments);
XN.dom.enable();
return this;
},_hideTimer:null,_clearHideTimer:function(){
if(this._hideTimer){
clearTimeout(this._hideTimer);
this._hideTimer=null;
}
},autoHide:function(t){
var _97=this;
this._hideTimer=setTimeout(function(){
_97.hide();
},t*1000);
return this;
}});
})();
XN.ui.panel=XN.ui.dialog;
XN.ui.dialog.prototype.setHeader=function(h){
if(h&&h!==""){
this.header.addChild(h);
}else{
this.header.innerHTML="";
}
};
XN.ui.dialog.prototype.setFooter=function(f){
if(f&&f!==""){
this.footer.addChild(f);
}else{
this.footer.innerHTML="";
}
};
XN.ui.menu=function(_9a){
var _9b=this;
this.config={alignType:"4-1",barOnshowClass:"",tagName:"div",disalbeButtonClickEvent:true,fireOn:"click",keep:0.2,useIframeInIE6:true,effectTime:50};
$extend(this.config,_9a);
var _9c;
if(this.getConfig("text")){
this.frame=_9c=$element(this.getConfig("tagName"));
_9c.setContent(this.getConfig("text"));
}else{
if(this.getConfig("button")){
this.frame=_9c=$(this.getConfig("button"));
}else{
return false;
}
}
this._alignType=this.getConfig("alignType");
if(this.getConfig("menu")){
$(this.getConfig("menu")).hide();
this.menu=new XN.ui.fixPositionElement({id:this.getConfig("menu"),alignType:this._alignType,alignWith:this.getConfig("alignWith")||this.frame,addIframe:this.getConfig("addIframe"),useIframeInIE6:this.getConfig("useIframeInIE6")});
this.container=this.menu.frame;
this._canAddSubMenu=false;
}else{
var dt=$element("div");
dt.hide();
this.menu=new XN.ui.fixPositionElement({id:dt,alignType:this._alignType,alignWith:this.getConfig("alignWith")||this.frame,addIframe:this.getConfig("addIframe"),useIframeInIE6:this.getConfig("useIframeInIE6")});
this.container=$element("div");
this._menu.setContent(this.container);
}
this.menu.setIndex(10001);
XN.event.addEvent(this.menu.frame,"click",function(e){
e=e||window.event;
_9b._frameOnClick(e);
},false);
this.menu.setOffsetX(this.getConfig("offsetX")||0);
this.menu.setOffsetY(this.getConfig("offsetY")||0);
var _9f=this.getConfig("event");
if(_9f=="click"){
XN.event.addEvent(this.frame,"click",function(e){
_9b._buttonClick(e||window.event);
});
XN.event.addEvent(document,"click",function(e){
_9b._documentClick(e||window.event);
});
}else{
if(_9f=="mouseover"){
XN.event.addEvent(this.frame,"mouseover",function(e){
_9b._frameMouseOver(e||window.event);
});
if(this.getConfig("disalbeButtonClickEvent")){
XN.event.addEvent(this.frame,"onclick",function(e){
XN.event.stop(e||window.event);
});
}
XN.event.addEvent(this.frame,"mouseleave",function(){
_9b._buttonMouseLeave();
});
XN.event.addEvent(this.menu.frame,"mouseleave",function(){
_9b._menuMouseLeave();
});
XN.event.addEvent(this.menu.frame,"mouseover",function(){
_9b._mouseOverMenu=true;
});
}else{
if(_9f=="manual"){
}
}
}
XN.event.addEvent(window,"resize",function(){
_9b.menu.refresh();
});
this.hide();
};
XN.ui.menu.prototype=$extend({},XN.ui.container);
$extend(XN.ui.menu.prototype,{isShow:true,menu:null,_alignType:null,_button:null,_canAddSubMenu:true,_delayTimer:null,_mouseOverMenu:false,_mouseOverButton:false,_clearTimer:function(){
if(this._delayTimer){
clearTimeout(this._delayTimer);
this._delayTimer=null;
}
},_buttonClick:function(e){
XN.event.stop(e);
if(this.isShow){
this.hide();
}else{
this.show();
}
},_documentClick:function(e){
this.hide();
},_frameOnClick:function(e){
var _a7=this;
var el=XN.event.element(e);
var tag=el.tagName.toLowerCase();
if(tag=="a"){
return true;
}
if((tag=="input"&&(el.type=="radio"||el.type=="checkbox"))||tag=="label"){
this.isShow=false;
setTimeout(function(){
_a7.isShow=true;
},20);
return true;
}
while(el!=this.menu.frame&&el.tagName&&el.tagName.toLowerCase()!="a"){
el=el.parentNode;
}
if(el.tagName.toLowerCase()=="a"){
return true;
}
XN.event.stop(e);
},_frameMouseOver:function(e){
var _ab=this;
this._mouseOverButton=true;
this._clearTimer();
var _ac=this.getConfig("delay");
if(_ac){
this._delayTimer=setTimeout(function(){
if(_ab._mouseOverButton){
_ab.show();
}
},_ac*1000);
}else{
_ab.show();
}
XN.event.stop(e);
},_buttonMouseLeave:function(){
var _ad=this;
this._mouseOverButton=false;
this._clearTimer();
setTimeout(function(){
if(!_ad._mouseOverMenu){
_ad.hide();
}
},this.getConfig("effectTime"));
},_menuMouseLeave:function(){
var _ae=this;
this._mouseOverMenu=false;
this._clearTimer();
setTimeout(function(){
if(!_ae._mouseOverButton){
_ae.hide();
}
},this.getConfig("effectTime"));
},getConfig:function(key){
var _b0={"hoverClass":"barOnshowClass","event":"fireOn","button":"bar","delay":"keep"};
if(_b0[key]){
return this.config[key]||this.config[_b0[key]];
}
return this.config[key];
},show:function(){
if(this.isShow){
return this;
}
this.menu.show();
this.frame.addClass(this.getConfig("hoverClass"));
this.onShow();
this.isShow=true;
return this;
},setWidth:function(w){
this.menu.frame.style.width=w+"px";
this.menu.refresh();
return this;
},hide:function(){
if(!this.isShow){
return this;
}
this.menu.hide();
this.frame.delClass(this.getConfig("hoverClass"));
this.isShow=false;
this.onHide();
return this;
},refresh:function(){
if(this.isShow){
this.menu.show();
}
return this;
},onShow:XN.func.empty,onHide:XN.func.empty});
XN.event.enableCustomEvent(XN.ui.menu.prototype);
XN.ui.autoComplete=function(p){
var _b3=this;
this.config=this.config||{};
$extend(this.config,{inputTip:null,searchDelay:0.2,DS:null,enableCache:true,maxCache:10});
$extend(this.config,p);
if(this.getConfig("enableCache")){
this.cache=new XN.util.cache({cacheLength:this.getConfig("maxCache")});
}
if(this.getConfig("input")){
var _b4=this.input=$(this.getConfig("input"));
}else{
var _b4=this.input=$element("input");
_b4.type="text";
_b4.addClass("input-text");
}
this.frame=_b4;
XN.event.addEvent(_b4,"focus",function(e){
_b3._startCheck();
_b3.fireEvent("focus");
});
XN.event.addEvent(_b4,"blur",function(e){
_b3._endCheck();
_b3.fireEvent("blur");
});
this.addEvent("focus",function(){
var v=this.input.value;
if(v==""||v==this.getConfig("inputTip")){
this.fireEvent("noinput");
}
});
this.addEvent("blur",function(){
this._lastInput=null;
});
XN.event.addEvent(_b4,"click",function(e){
XN.event.stop(e||window.event);
});
XN.event.addEvent(_b4,"keydown",function(e){
_b3._userInput=true;
e=e||window.event;
if(e.keyCode==13){
XN.event.stop(e);
}
_b3.fireEvent("keydown",e);
});
_b4.setAttribute("AutoComplete","off");
this.DS=this.getConfig("DS");
};
XN.ui.autoComplete.prototype=$extend({},XN.ui.element);
$extend(XN.ui.autoComplete.prototype,{input:null,cache:null,_userInput:false,_lastInput:null,getConfig:function(key){
if(key=="input"){
return this.config["input"]||this.config["id"];
}
return this.config[key];
},_startCheck:function(){
var _bb=this;
this._inputTimer=setInterval(function(){
if(_bb._userInput){
_bb._userInput=false;
return;
}
_bb._checkInput();
},this.getConfig("searchDelay")*1000);
},_endCheck:function(){
clearInterval(this._inputTimer);
this._inputTimer=null;
},_checkInput:function(){
var _bc=this;
var cv=this.input.value;
if(XN.string.isBlank(cv)){
if(this._lastInput===""){
return;
}
this._lastInput="";
this.fireEvent("noinput");
return;
}
if(cv==this._lastInput){
return;
}
this._lastInput=cv;
this.fireEvent("searchbegin");
if(this.cache){
var _be=this.cache.get(cv);
if(_be){
this.fireEvent("searchover",_be);
return;
}
}
if(!this.DS){
XN.log("no ds");
this.fireEvent("NO_DS");
return;
}
this.DS.query(cv,function(r){
if(_bc.cache){
_bc.cache.add(cv,r);
}
_bc.fireEvent("searchover",r);
});
}});
XN.event.enableCustomEvent(XN.ui.autoComplete.prototype);
(function(){
var _c0={};
getCompleteMenu=function(id){
return _c0[id];
};
XN.ui.autoCompleteMenu=function(p){
var _c3=this;
this._MID=XN.util.createObjID();
_c0[this._MID]=this;
this.config=this.config||{};
$extend(this.config,{ulClassName:"",liClassName:"",liHoverClass:"m-autosug-hover",aClassName:"",noResult:"\u6ca1\u6709\u5339\u914d\u7ed3\u679c",dataLoading:"\u6b63\u5728\u52a0\u8f7d\u6570\u636e...",noInput:null,autoSelectFirst:false});
XN.ui.autoComplete.call(this,p);
var _c4=this.input;
var m=$element("div");
m.innerHTML=this.getConfig("wrapper")||this._wrapper();
this._menuList=m.firstChild;
this._ul=this._menuList.getElementsByTagName("ul")[0];
this.menu=new XN.ui.menu({button:_c4,menu:this._menuList,fireOn:"manual"});
this.addEvent("keydown",this._inputOnkeydown);
XN.event.addEvent(this._ul,"mousedown",function(e){
_c3._menuOnclick(e||window.event);
});
XN.event.addEvent(document,"click",function(){
_c3.menu.hide();
},false);
this.menu.hide();
this.addEvent("noinput",function(){
var tip=this.getConfig("noInput");
if(!tip){
this.menu.hide();
return;
}
this._ul.innerHTML="<li>"+tip+"</li>";
this.menu.show();
});
this.addEvent("NO_DS",function(){
var tip=this.getConfig("dataLoading");
this._ul.innerHTML="<li>"+tip+"</li>";
this.menu.show();
});
this.addEvent("searchover",this._buildMenu);
};
XN.ui.autoCompleteMenu.prototype=$extend({},XN.ui.autoComplete.prototype);
$extend(XN.ui.autoCompleteMenu.prototype,{menu:null,_menuList:null,_ul:null,_currentLi:null,_highlightMenuItem:function(li){
if(li==this._currentLi){
return;
}
var _ca=this.getConfig("liHoverClass");
if(this._currentLi!==null){
XN.element.delClass(this._currentLi,_ca);
}
XN.element.addClass(li,_ca);
this._currentLi=li;
var aid=this._currentLi.getAttribute("aid");
if(aid){
this.fireEvent("highlight",this.result[parseInt(aid)]);
}
},_inputOnkeydown:function(_cc){
var li;
if(_cc.keyCode==13){
if(this.menu.isShow&&this._currentLi){
var aid=this._currentLi.getAttribute("aid");
if(aid){
this._selectMenuItem(parseInt(aid));
}
}
return false;
}
if(_cc.keyCode==38){
if(this._currentLi&&this._currentLi.previousSibling){
li=this._currentLi.previousSibling;
}else{
li=this._ul.lastChild;
}
this._highlightMenuItem(li);
return false;
}
if(_cc.keyCode==40){
if(this._currentLi&&this._currentLi.nextSibling){
li=this._currentLi.nextSibling;
}else{
li=this._ul.firstChild;
}
this._highlightMenuItem(li);
return false;
}
return true;
},_menuOnclick:function(_cf){
var el=XN.event.element(_cf);
while(el&&el.tagName&&el.tagName.toLowerCase()!=="li"){
el=el.parentNode;
}
if(!el||el.nodeType!==1||!el.getAttribute("aid")){
return false;
}
this._selectMenuItem(parseInt(el.getAttribute("aid")));
return false;
},_menuOnmouseover:function(_d1){
var el=XN.event.element(_d1);
if(el.parentNode==$("dropmenuHolder")){
return;
}
while(el&&el.tagName&&el.tagName.toLowerCase()!=="li"){
el=el.parentNode;
}
if(!el||el.nodeType!==1||!el.getAttribute("aid")){
return false;
}
this._highlightMenuItem(el);
return false;
},_selectMenuItem:function(id){
this.menu.hide();
this.input.focus();
this.fireEvent("select",this.result[id]);
this._lastInput=this.input.value;
},_buildMenu:function(_d4){
var _d5=this;
this.result=_d4;
if(_d4.length==0){
var _d6=this.getConfig("noResult");
if(isFunction(_d6)){
_d6=_d6.call(this);
}
this._ul.innerHTML="<li>"+_d6+"</li>";
this.menu.show();
this._currentLi=null;
return;
}
var lis=[];
lis.push(this.firstMenuItem());
var len=_d4.length-1;
XN.array.each(_d4,function(i,v){
lis.push("<li onmouseover=\"getCompleteMenu("+_d5._MID+")._highlightMenuItem(this);\" aid=\""+i+"\">"+_d5.buildMenu(v)+"</li>");
});
lis.push(this.lastMenuItem());
this._ul.innerHTML=lis.join("");
if(this.getConfig("autoSelectFirst")){
this._highlightMenuItem(this._ul.firstChild);
}
this.menu.show();
},firstMenuItem:function(){
return "";
},lastMenuItem:function(){
return "";
},buildMenu:function(r){
return "<li>"+r.name+"</li>";
},setMenuWidth:function(w){
this.menu.setWidth(w);
}});
patchForUiMenu();
})();
XN.ui.friendSelector=function(_dd){
var _de=this;
this.config=this.config||{};
$extend(this.config,{getFriendsUrl:"/getfriendsajax.do?s=1",url:"/friendsSelector.do",param:{}});
XN.ui.autoCompleteMenu.call(this,_dd);
this.addEvent("select",function(r){
this.input.value=r.name;
if(this.onSelectOne){
this.onSelectOne(r);
}
});
this.buildMenu=function(r){
return r.name;
};
this.addEvent("focus",function(){
if(this._ready){
return;
}
if(this._isLoading){
return;
}
this.loadFriends();
});
};
XN.ui.friendSelector.prototype=$extend({},XN.ui.autoCompleteMenu.prototype);
$extend(XN.ui.friendSelector.prototype,{_isLoading:false,_ready:false,isReady:function(){
return this._ready;
},isLoading:function(){
return this._isLoading;
},loadFriends:function(r){
if(this.isLoading()){
return;
}
this._isLoading=true;
var _e2=this;
var p={};
p["init"]=true;
p["uid"]=false;
p["uhead"]=false;
p["uname"]=false;
p["group"]=false;
p["net"]=false;
p["param"]=this.getConfig("param");
new XN.NET.xmlhttp({useCache:true,url:this.getConfig("url"),method:"get",data:"p="+XN.JSON.build(p),onSuccess:function(r){
r=XN.JSON.parse(r.responseText);
_e2._onload(r);
}});
},_onload:function(r){
this.isLoading=false;
this._ready=true;
this.config.qkey=r.qkey;
this.DS=new XN.util.DS_friends({url:this.getConfig("url"),qkey:this.getConfig("qkey"),limit:this.getConfig("limit")});
}});
XN.ui.friendSelectorSynchronous=function(a,b){
function s(id,ac,v){
if(isObject(id)){
id=id.id;
}
if(v.isReady()){
try{
v[ac](id);
}
catch(e){
}
}else{
v.addEvent("load",function(){
try{
v[ac](id);
}
catch(e){
}
});
v.loadFriends();
}
}
a.addEvent("select",function(id){
s(id,"select",b);
});
a.addEvent("deselect",function(id){
s(id,"deselect",b);
});
b.addEvent("select",function(id){
s(id,"select",a);
});
b.addEvent("deselect",function(id){
s(id,"deselect",a);
});
};
(function(){
XN.ui.multiFriendSelector=function(_ef){
var _f0=this;
this._ID=XN.util.createObjID();
this.config=this.config||{};
$extend(this.config,{inputName:"ids",nameInputName:"names",url:"/friendsSelector.do",initParam:{},param:{},noInput:false,maxNum:-1});
$extend(this.config,_ef);
this.frame=$element("div");
var div=$element("div");
div.hide();
document.body.appendChild(div);
div.appendChild(this.frame);
this.frame.innerHTML=["<div id=\""+this.getID("friendsContainer")+"\" class=\"tokenizer friendAutoSelector\">","<span class=\"tokenizer_stretcher\">^_^</span>","<span class=\"tab_stop\"><input/></span>","<span id=\""+this.getID("inputContainer")+"\" class=\"tokenizer_input\"><input id=\""+this.getID("input")+"\" type=\"text\" /></span>","</div>","<div class=\"float-right\" id=\""+this.getID("menu")+"\"></div>"].join("");
this.input=this.getEl("input");
this.menuContainer=this.getEl("menu");
XN.event.addEvent(this.getEl("friendsContainer"),"click",function(e){
_f0._parseClickEvent(e||window.event);
});
this.autoComplete=new XN.ui.friendSelector({id:this.input,inputTip:"\u8f93\u5165\u597d\u53cb\u59d3\u540d...",autoSelectFirst:true,url:this.getConfig("url"),param:this.getConfig("param")});
this.autoComplete.loadFriends=function(r){
if(this.isLoading()){
return;
}
this._isLoading=true;
var p={};
p["init"]=true;
p["uid"]=true;
p["uhead"]=false;
p["uname"]=true;
p["group"]=false;
p["net"]=false;
$extend(p,_f0.getConfig("initParam"));
p["param"]=this.getConfig("param");
new XN.NET.xmlhttp({useCache:true,url:this.getConfig("url"),method:"get",data:"p="+XN.JSON.build(p),onSuccess:function(r){
r=XN.JSON.parse(r.responseText);
_f0._allFriends=r.candidate;
_f0.fireEvent("load");
_f0.autoComplete._onload(r);
}});
};
this.autoComplete.buildMenu=function(r){
return "<p>"+r.name+"</p>";
};
this.autoComplete.setMenuWidth(129);
this.autoComplete.addEvent("keydown",function(e){
_f0._onInputKeydown(e);
});
this.autoComplete.addEvent("select",function(r){
XN.log(this.input);
this.input.value="";
_f0.selectFriend(r);
});
if(this.getConfig("noInput")){
this.input.hide();
}
this.fireEvent("init");
};
var _f9=XN.ui.multiFriendSelector.prototype=$extend({},XN.ui.element);
$extend(_f9,{isReady:function(){
return this.autoComplete.isReady();
},isLoading:function(){
return this.autoComplete.isLoading();
},loadFriends:function(){
this.autoComplete.loadFriends();
},getUserByID:function(id){
id=String(id);
var rt=null;
XN.array.each(this._allFriends,function(i,v){
if(String(v.id)==id){
rt=v;
return false;
}
});
return rt;
},getConfig:function(key){
if(key=="inputName"){
return this.config["idInputName"]||this.config["inputName"];
}
return this.config[key];
},getID:function(id){
return "mfs_"+this._ID+id;
},getFriendID:function(id){
return this.getID("friend_"+id);
},getFriendEl:function(id){
return $(this.getFriendID(id));
},getEl:function(id){
return $(this.getID(id));
},getFriendsNum:function(){
return this.getEl("friendsContainer").getElementsByTagName("a").length;
},getSelectedFriends:function(){
var rt=[];
var a=XN.array.build(this.getEl("friendsContainer").getElementsByTagName("a"));
XN.array.each(a,function(i,v){
rt.push(v.uid+"");
});
return rt;
},reset:function(){
this.deselectAll();
},deselectAll:function(){
var els=XN.array.build(this.getEl("friendsContainer").getElementsByTagName("a"));
XN.array.each(els,function(i,v){
XN.element.remove(v);
});
this.fireEvent("deselectAll",this.getIds());
},selectFriends:function(fs){
var This=this;
XN.array.each(fs,function(i,v){
This.select(v);
});
},deselectFriends:function(fs){
var This=this;
XN.array.each(fs,function(i,v){
This.deselect(v);
});
},select:function(o){
XN.log("mfs select");
var _113=this.getConfig("maxNum");
if(_113!==-1){
if(this.getFriendsNum()>_113){
this.fireEvent("overMaxNum",_113);
return;
}
}
if(isString(o)){
o={id:o,name:this.getUserByID(o).name};
}
if(this.getFriendEl(o.id)){
return;
}
this.getEl("friendsContainer").insertBefore(this.createFriendHTML(o.id,o.name),this.getEl("inputContainer"));
this.fireEvent("select",o.id);
},deselect:function(uid){
if(!this.getFriendEl(uid)){
return;
}
this.getFriendEl(uid).remove();
this.fireEvent("deselect",uid);
},_parseClickEvent:function(e){
var el=XN.event.element(e);
XN.event.stop(e);
if(el&&el.getAttribute("action")){
this.deselectFriend(el.getAttribute("uid"));
}
},createFriendHTML:function(uid,_118){
var a=$element("a");
a.id=this.getFriendID(uid);
a.uid=uid;
a.href="#nogo";
a.className="token";
a.tabindex="-1";
a.innerHTML=["<span>\n<span>\n<span>\n<span>\n<input type=\"hidden\" value=\"",uid,"\" name=\"",this.getConfig("inputName"),"\" />\n","<input type=\"hidden\" value=\"",_118,"\" name=\"",this.getConfig("nameInputName"),"\" />\n",_118,"<span uid=\"",uid,"\" action=\"x\" class=\"x\" onmouseout=\"this.className='x'\" onmouseover=\"this.className='x_hover'\" >\n</span>\n</span>\n</span>\n</span>\n</span>"].join("");
return a;
},_onInputKeydown:function(_11a){
var i=this.getEl("inputContainer"),pa=i.previousSibling,na=i.nextSibling,_11e=this.input,c=this.getEl("friendsContainer");
if(_11a.keyCode==8&&this.input.value==""){
if(pa){
c.removeChild(pa);
this.deselectFriend(pa.aid);
}
return true;
}else{
if(_11a.keyCode==37&&this.input.value==""){
if(pa&&pa.tagName.toLowerCase()=="a"){
i.parentNode.removeChild(i);
c.insertBefore(i,pa);
setTimeout(function(){
_11e.focus();
},0);
}
return true;
}else{
if(_11a.keyCode==39&&this.input.value==""){
if(na&&na.tagName.toLowerCase()=="a"){
i.parentNode.removeChild(i);
XN.dom.insertAfter(i,na);
setTimeout(function(){
_11e.focus();
},0);
}
return true;
}
}
}
return false;
}});
XN.event.enableCustomEvent(_f9);
_f9.deSelectAll=_f9.deselectAll;
_f9.deSelectFriend=_f9.deselectFriend=_f9.deselect;
_f9.selectFriend=_f9.select;
_f9.getSelectedFriendsID=_f9.getSelectedFriends;
_f9.getIds=_f9.getSelectedFriends;
})();
XN.ui.friendSelectorWithMenu=function(p){
var _121=new XN.ui.friendSelector(p);
var menu=new XN.ui.friendSelectorMenu({url:_121.getConfig("url"),param:_121.getConfig("param"),multi:false});
var div=$element("div");
div.addChild(_121);
div.addChild(menu);
_121.frame=div;
_121.addEvent("focus",function(){
menu.menu.hide();
});
menu.addEvent("select",function(p){
var This=this;
setTimeout(function(){
This.menu.hide();
},30);
_121.fireEvent("select",this.getUserByID(p));
});
if(XN.browser.Gecko){
menu.menu.menu.setOffsetY(1);
}
return _121;
};
XN.ui.multiFriendSelectorWithMenu=function(p){
var _127=new XN.ui.multiFriendSelector(p);
var menu=new XN.ui.friendSelectorMenu({url:_127.getConfig("url"),param:_127.getConfig("param"),multi:true});
_127.menuContainer.setContent(menu);
XN.ui.friendSelectorSynchronous(_127,menu);
return _127;
};
(function(ns){
var _12a=false;
var _12b=XN.event.addEvent;
var log=function(s){
if(_12a){
XN.log(isString(s)?"ui.tabView:"+s:s);
}
return s;
};
ns.tabView=function(_12e){
this.config={selectedClass:"select",event:"click",mouseOverDelay:0.2};
$extend(this.config,_12e);
this.init();
};
ns.tabView.prototype={_tabs:null,_currentTab:null,_idPre:null,_tabIndex:0,init:function(){
this._idPre=XN.util.createObjID();
this._tabs=[];
},getConfig:function(key){
if(key=="activeClass"){
return this.config["activeClass"]||this.config["selectedClass"];
}
return this.config[key];
},_getID:function(el){
log("_getID start");
log("param:");
log(el);
if(isString(el)){
return log(el);
}
if(el.id){
return log(el.id);
}
log("do not have id");
this._tabIndex++;
el.setAttribute("id","tabview_"+this._idPre+"_"+this._tabIndex);
return log(el.id);
},_getTab:function(id){
log("_getTab start");
log("param:id");
log(id);
if(!id){
return log(id);
}
if(id.label){
return log(id);
}
var key=this._getID(id);
log("key:"+key);
var tabs=this._tabs;
log("all tabs");
log(tabs);
for(var i=tabs.length-1;i>=0;i--){
if(tabs[i].key==key){
log("_getTab end");
return log(tabs[i]);
}
}
log("_getTab end");
return log(null);
},getCurrentTab:function(){
return this._getTab(this._currentTab);
},setCurrentTab:function(tab,_136){
log("setCurrentTab start");
var oldC=this.getCurrentTab();
var nowC=this._getTab(tab);
log("old current:");
log(oldC);
log("now current:");
log(nowC);
if(oldC&&oldC.key==nowC.key&&!_136){
return;
}
if(oldC){
this._deactiveTab(oldC);
}
this._activeTab(nowC);
this._setCurrentTab(nowC);
log("setCurrentTab end");
this.fireEvent("change",nowC);
return this;
},reset:function(){
var tab=this.getCurrentTab();
if(tab){
this._deactiveTab(tab);
}
this._setCurrentTab(null);
return this;
},_activeTab:function(tab){
log("_activeTab:");
log(tab);
tab.getEl("label").addClass(this.getConfig("activeClass"));
if(tab.content){
tab.getEl("content").show();
}
tab.onActive(tab);
log("_activeTab end");
},_deactiveTab:function(tab){
if(tab.getEl("label")){
tab.getEl("label").delClass(this.getConfig("activeClass"));
}
if(tab.content){
tab.getEl("content").hide();
}
tab.onInactive(tab);
},_setCurrentTab:function(tab){
log("_setCurrentTab start");
tab=this._getTab(tab);
log("currentTab:");
log(tab);
this._currentTab=tab?tab.key:null;
log("this._currentTab");
log(this._currentTab);
log("_setCurrentTab end");
},addTab:function(t){
log("addTab start");
log("params:");
log(t);
var This=this;
var tab={onActive:XN.func.empty,onClick:XN.func.empty,onInactive:XN.func.empty,onInit:XN.func.empty,getEl:function(key){
return $(this[key]);
},active:false};
t.label=this._getID(t.label);
log("get label id:"+t.label);
t.key=t.key||t.label;
log("get key:"+t.key);
if(t.content){
t.content=this._getID(t.content);
log("get content id:"+t.content);
}
$extend(tab,t);
this._tabs.push(tab);
log("all tabs");
log(this._tabs);
if(tab.active&&this._currentTab===null){
if(tab.content){
tab.getEl("content").show();
}
tab.getEl("label").addClass(this.getConfig("activeClass"));
this._setCurrentTab(tab);
}else{
if(tab.content){
tab.getEl("content").hide();
}
}
var ev=this.getConfig("event");
if(ev=="click"){
_12b(tab.getEl("label"),"click",function(e){
e=e||window.event;
XN.event.stop(e);
This._eventHander(e,tab.getEl("label"));
},false);
}else{
if(ev=="mouseover"){
var _143=true;
var _144=null;
_12b(tab.getEl("label"),"mouseover",function(e){
var el=this;
_143=true;
_144=setTimeout(function(){
if(!_143){
return;
}
e=e||window.event;
This._eventHander(e,tab.getEl("label"));
},This.getConfig("mouseOverDelay")*1000);
},false);
_12b(tab.getEl("label"),"mouseleave",function(e){
_143=false;
if(_144){
clearTimeout(_144);
}
},false);
}
}
tab.onInit(tab);
log("addTab end");
return this;
},_eventHander:function(e,el){
log("on click,el:");
log(el);
log("get tab form by el:");
var tab=this._getTab(el);
this.setCurrentTab(tab);
tab.onClick(e,tab);
},refresh:function(){
this._activeTab(this.getCurrentTab());
return this;
},showTab:function(id,_14c){
this.setCurrentTab(id,_14c);
},hideAll:function(){
this.reset();
}};
XN.event.enableCustomEvent(ns.tabView.prototype);
})(XN.ui);
XN.ui.refreshAll=function(){
document.body.style.zoom=1.1;
document.body.style.zoom=1;
};
XN.effect={fadeIn:function(_14d,_14e){
if(_14d.fadetimer){
return;
}
_14e=_14e||XN.FUNC.empty;
var op=0;
_14d.setOpacity(0);
_14d.style.display="";
_14d.fadetimer=setInterval(function(){
XN.Element.setOpacity(_14d,(op+=0.2));
if(op>=1){
clearInterval(_14d.fadetimer);
_14d.fadetimer=null;
_14e(_14d);
}
},60);
},fadeOut:function(_150,_151){
if(_150.fadetimer){
return;
}
_151=_151||XN.FUNC.empty;
var op=1;
_150.setOpacity(1);
_150.fadetimer=setInterval(function(){
XN.Element.setOpacity(_150,(op-=0.2));
if(op<=0){
clearInterval(_150.fadetimer);
_150.fadetimer=null;
_151(_150);
_150.setOpacity(1);
}
},60);
},gradient:function(_153,r,g,b,_157){
if(_153.gradientTimer){
return;
}
_157=_157||XN.FUNC.empty;
_153.style.backgroundColor="#fff";
_153.style.backgroundColor="rgb("+r+","+g+","+b+")";
_153.gradientTimer=setInterval(function(){
b+=10;
_153.style.backgroundColor="rgb("+r+","+g+","+(b>255?255:b)+")";
if(b>255){
clearInterval(_153.gradientTimer);
_153.gradientTimer=null;
_157(_153);
}
},60);
},slideOpen:function(_158){
if(_158.slidetimer){
return;
}
if(!_158.slideHeight){
var _159=_158.getStyle("position");
_158.setStyle("position:absolute;left:-99999px;top:-99999px;");
_158.show();
_158.slideHeight=_158.offsetHeight;
_158.hide();
_158.setStyle("position:"+_159+";left:auto;top:auto;");
}
var eh=_158.slideHeight,h=0;
var step=parseInt(eh/10);
_158.style.height="0px";
_158.style.display="";
_158.style.overflow="hidden";
_158.slidetimer=setInterval(function(){
_158.style.height=(h+=step)+"px";
if(h>=eh){
clearInterval(_158.slidetimer);
_158.slidetimer=null;
_158.style.height=eh;
_158.style.overflow=_158.slideOverflow;
}
},50);
},slideClose:function(_15d){
if(_15d.slidetimer){
return;
}
var eh=_15d.offsetHeight,h=eh;
_15d.slideHeight=eh;
_15d.slideOverflow=_15d.getStyle("overflow");
_15d.style.overflow="hidden";
var step=parseInt(eh/10);
_15d.slidetimer=setInterval(function(){
_15d.style.height=(h-=step)+"px";
if(h<=0){
clearInterval(_15d.slidetimer);
_15d.slidetimer=null;
_15d.style.display="none";
_15d.style.height=eh;
_15d.style.overflow=_15d.slideOverflow;
}
},50);
},scrollTo:function(_161,_162,_163){
if(_161.scrolltimer){
return;
}
_162=_162||10;
_163=_163||XN.FUNC.empty;
var d=_161.realTop();
var i=XN.EVENT.winHeight();
var h=document.body.scrollHeight;
var a=XN.EVENT.scrollTop();
var _168=null;
if(d>a){
if(d+_161.offsetHeight<i+a){
return;
}
_161.scrolltimer=setInterval(function(){
a+=Math.ceil((d-a)/_162)||1;
window.scrollTo(0,a);
if(a==d){
clearInterval(_161.scrolltimer);
_161.scrolltimer=null;
}
},10);
}else{
_161.scrolltimer=setInterval(function(){
a+=Math.ceil((d-a)/_162)||-1;
window.scrollTo(0,a);
if(a==d){
clearInterval(_161.scrolltimer);
_161.scrolltimer=null;
}
},10);
}
}};
XN.EFFECT=XN.Effect=XN.effect;
XN.ui.getHiddenDiv=function(){
if(!this._hiddenDiv){
this._hiddenDiv=$element("div").hide();
document.body.appendChild(this._hiddenDiv);
}
return this._hiddenDiv;
};
XN.ui.friendSearchBar=function(p){
var _16a=$(p.input);
var _16b=$(p.submit||null);
var form=$(p.form);
var tip=p.tip||"\u627e\u4eba...";
var _16e=p.action||function(p){
window.location.href="http://"+XN.ENV.domain+"/profile.do?id="+p.id;
};
var _170=false;
(new XN.FORM.inputHelper(_16a)).setDefaultValue(tip).onEnter(function(el){
if(_170){
return;
}
if(!XN.STRING.isBlank(el.value)){
form.submit();
}
});
var _172=16;
var _173=new XN.UI.friendSelector({id:_16a,noResult:function(){
return "\u641c\u7d22\""+this.input.value+"\"";
},limit:_172});
_173.lastMenuItem=function(){
if(this.result.length==_172){
return "<li><p><a href=\"http://friend."+XN.env.domain+"/myfriendlistx.do?qu="+this.input.value+"\">\u70b9\u51fb\u67e5\u770b\u66f4\u591a..</a></p></li>";
}else{
return "";
}
};
_173.setMenuWidth(_16a.offsetWidth);
_173.onSelectOne=function(p){
_170=true;
_16e(p);
};
if(_16b){
_16b.onclick=function(){
if(_170){
return;
}
var v=_16a.value;
if(v!=tip&&!XN.STRING.isBlank(v)){
form.submit();
return false;
}
};
}
};
function patchForUiMenu(){
XN.ui.autoCompleteMenu.prototype._wrapper=function(){
return ["<div class=\"m-autosug\">","<span class=\"x1\">","<span class=\"x1a\"></span>","</span>","<span class=\"x2\">","<span class=\"x2a\"></span>","</span>","<div class=\"m-autosug-minwidth\">","<div class=\"m-autosug-content\">","<ul></ul>","</div>","</div>","</div>"].join("");
};
}

